2006-09-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.c (post_parse_hook):
* gdk/gdk.c (gdk_init): Handle display_name being NULL.
(#354004, Chris Wilson)
+2006-09-03 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkmain.c (post_parse_hook):
+ * gdk/gdk.c (gdk_init): Handle display_name being NULL.
+ (#354004, Chris Wilson)
+
2006-09-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_beep): No
{
if (!gdk_init_check (argc, argv))
{
- g_warning ("cannot open display: %s", gdk_get_display_arg_name ());
+ const char *display_name = gdk_get_display_arg_name ();
+ g_warning ("cannot open display: %s", display_name ? display_name : "");
exit(1);
}
}
{
if (gdk_display_open_default_libgtk_only () == NULL)
{
+ const char *display_name = gdk_get_display_arg_name ();
g_set_error (error,
G_OPTION_ERROR,
G_OPTION_ERROR_FAILED,
"cannot open display: %s",
- gdk_get_display_arg_name ());
+ display_name ? display_name : "" );
return FALSE;
}